<meta charset="UTF-8">
<script>
  //symbol表示独一无二的对象，是es6的数据类型，用作属性时不能person.name--->person[name]
  let str = 'name'
  let name = Symbol(str)
  console.log(name.toString())
  let n = 'tom'
  //用作属性
  let person = { name: n }
  //person[name] = 'tom'
  console.log(person[name])
  //
</script>
